<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <table>
        <tr>
            <td><img src="img/img.png" width="60px" height="60px"></td>
            <td colspan="3">购物简易计算器</td>
        </tr>
        <tr>
            <td>第一个数</td>
            <td colspan="3"><input type="number" id="num1"></td>
        </tr>
        <tr>
            <td>第二个数</td>
            <td colspan="3"><input type="number" id="num2"></td>
        </tr>
        <tr>
            <td><button onclick="clickMe1()">+</button></td>
            <td><button onclick="clickMe2()">-</button></td>
            <td><button onclick="clickMe3()">*</button></td>
            <td><button onclick="clickMe4()">/</button></td>
        </tr>
        <tr>
            <td>计算结果</td>
            <td colspan="3"><input id="result"></input></td>
        </tr>
    </table>
    <script>
        function clickMe1(){
            var num1 = document.getElementById('num1');
            var num2 = document.getElementById('num2');
            var result = parseInt(num1.value) + parseInt(num2.value);
            document.getElementById("result").value=result;
        }
        function clickMe2(){
            var num1 = document.getElementById('num1');
            var num2 = document.getElementById('num2');
            var result = parseInt(num1.value) - parseInt(num2.value);
            document.getElementById("result").value=result;
        }
        function clickMe3(){
            var num1 = document.getElementById('num1');
            var num2 = document.getElementById('num2');
            var result = parseInt(num1.value) * parseInt(num2.value);
            document.getElementById("result").value=result;
        }
        function clickMe4(){
            var num1 = document.getElementById('num1');
            var num2 = document.getElementById('num2');
            var result = parseInt(num1.value) / parseInt(num2.value);
            document.getElementById("result").value=result;
        }
    </script>
</body>
</html>